home *** CD-ROM | disk | FTP | other *** search
/ Champak 26 (Anniversary Edition) / Volume 26 [Anniversary Edition] - JOGO DISK .iso / DEPOSITO / REmovido / Esportes / Board.swf / scripts / DefineSprite_144 / frame_5 / DoAction.as
Text File  |  2006-06-13  |  1KB  |  52 lines

  1. skiY = _Y + skiSpeed;
  2. rampX = _X - getProperty("../ramp", _X);
  3. rampY = _Y - getProperty("../ramp", _Y);
  4. bigrampX = _X - getProperty("../bigramp", _X);
  5. bigrampY = _Y - getProperty("../bigramp", _Y);
  6. if(skijump == "0" and (- "80" < bigrampX and bigrampX < - "20" and - "20" < bigrampY and bigrampY < "50" or - "60" < rampX and rampX < - "10" and - "20" < rampY and rampY < "50"))
  7. {
  8.    skijump = "1";
  9.    tellTarget("skieranim")
  10.    {
  11.       gotoAndPlay(7);
  12.    }
  13. }
  14. crashX = _X - getProperty("../trail1", _X);
  15. crashY = _Y - getProperty("../trail1", _Y);
  16. if(crashX < - "30" and - "70" < crashX and crashY < "10" and - "30" < crashY and eval("../trail1:jumpscale") < "120" and "150" < eval("../trail1:restart"))
  17. {
  18.    tellTarget("../trail1/boardoanim")
  19.    {
  20.       gotoAndStop(11);
  21.    }
  22.    tellTarget("../trail1")
  23.    {
  24.       gotoAndPlay(25);
  25.    }
  26. }
  27. if(skiY < "100")
  28. {
  29.    _Y = skiY;
  30.    gotoAndPlay(4);
  31. }
  32. else if(skijump == "0")
  33. {
  34.    skiDirection = "1" - random("3");
  35.    tellTarget("skieranim")
  36.    {
  37.       if(eval("../:skiDirection") < "0")
  38.       {
  39.          gotoAndPlay(2);
  40.       }
  41.       else if("0" < eval("../:skiDirection"))
  42.       {
  43.          gotoAndPlay(4);
  44.       }
  45.       else
  46.       {
  47.          gotoAndStop(1);
  48.       }
  49.    }
  50.    gotoAndPlay(10);
  51. }
  52.